package cheme.ProcessModel.ProcessUnits;

import java.io.Serializable;

import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.Rectangle;

import cheme.ProcessModel.IModelElement;

public abstract class AbstractTerminal extends ProcessUnit implements Serializable
{
	/*
	 * Indicates the square size of the elements image in the presentation
	 * layer. This is only a default value and the elements specified image will
	 * override it in the end.
	 */
	
	protected static final int DIMENSION = 20;
	
	public AbstractTerminal(IModelElement parent)
	{
		super(parent);
	}
	
	public AbstractTerminal(IModelElement parent, Point centerPoint)
	{
		super(parent);
		setBounds(new Rectangle(centerPoint.x - DIMENSION/2, centerPoint.y - DIMENSION/2, DIMENSION, DIMENSION));
	}
	
	public Dimension getSize()
	{
		return new Dimension(DIMENSION,DIMENSION);
	}
}
